- 2 minutes to read

HTTP Error 405.0 - Method Not Allowed


Information

If WebDAV is installed and if you get a 405 error on edit (Update/Delete) of any resource in the WebAPI or WebClient. You may use the solution described in this article to solve the problem, You can do this for the whole Web Site (usually named Default Web Site) if this is OK, or you have to do it for each Nodinite Application within IIS.

Example error message as shown in the WebClient

png_WebClientUnknownError

Full error message

png_WebDAVModuleMethodNotAllowed

Solution

Remove WebDav from Modules and from Handler Mappings in IIS
png_IISHome

Modules

png_ModuleWebDAVRemove

Handler Mappings

png_HandlerWebDAVRemove

NOTE: Restart IIS or Recycle the Application pool after this operation

Web.config for WebAPI or WebClient should have the following exclusions:

...
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WebDAVModule" />
    </modules>
    <handlers>
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
      <remove name="WebDAV" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    </handlers>
  </system.webServer>
...

Web Client
Web API